Package com.cisco.pt.ipc.ui.impl
Class ComponentItemImpl
java.lang.Object
com.cisco.pt.ipc.impl.IPCObjectImpl
com.cisco.pt.ipc.ui.impl.ComponentItemImpl
- All Implemented Interfaces:
IPCObject,ComponentItem
Information provided by the PKI file:
\class ComponentItem
\brief ComponentItem handles and manipulates component items, such as devices, on the workspace.
\example appWindow().getActiveWorkspace().getLogicalWorkspace().getComponentItem("Router0")
- Author:
- Auto-generated
-
Field Summary
Fields inherited from class com.cisco.pt.ipc.impl.IPCObjectImpl
accessMessage, ipcFactory, packetTracerSession -
Constructor Summary
ConstructorsConstructorDescriptionComponentItemImpl(IPCFactory ipcFactory, PacketTracerSession packetTracerSession, IPCMessageLTV accessMessage) -
Method Summary
Modifier and TypeMethodDescriptiondevice()Information provided by the PKI file:Information provided by the PKI file:intgetName()Information provided by the PKI file:Information provided by the PKI file:intgetWidth()intInformation provided by the PKI file:intInformation provided by the PKI file:intInformation provided by the PKI file:intInformation provided by the PKI file:booleanloadAccessoryImage(int slotNum, String imagePath) Information provided by the PKI file:voidmoveBy(double x, double y) Information provided by the PKI file:booleanmoveIntoCluster(String name) Information provided by the PKI file:booleanInformation provided by the PKI file:voidmoveTo(double x, double y) Information provided by the PKI file:voidremoveAccessory(int slotNum) Information provided by the PKI file:voidsetSelected(boolean bSelected) Information provided by the PKI file:voidsetVelocity(double xv, double yv) Information provided by the PKI file:voidsetVisible(boolean bVisible) Information provided by the PKI file:voidsetX(double x) Information provided by the PKI file:voidsetXCenter(int x) Information provided by the PKI file:voidsetXVelocity(double xv) Information provided by the PKI file:voidsetY(double y) Information provided by the PKI file:voidsetYCenter(int y) Information provided by the PKI file:voidsetYVelocity(double yv) Information provided by the PKI file:inttype()Information provided by the PKI file:doubleInformation provided by the PKI file:doubleInformation provided by the PKI file:Methods inherited from class com.cisco.pt.ipc.impl.IPCObjectImpl
getAccessMessage, getClassName, getFactory, getObjectUUID, getPacketTracerSession, sendMessage, sendMessageWithReturn, translateToCommandStatusStringPairMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.cisco.pt.ipc.IPCObject
getAccessMessage, getClassName, getFactory, getObjectUUID, getPacketTracerSession
-
Constructor Details
-
ComponentItemImpl
public ComponentItemImpl(IPCFactory ipcFactory, PacketTracerSession packetTracerSession, IPCMessageLTV accessMessage)
-
-
Method Details
-
getName
Information provided by the PKI file:
\brief Returns the name of this component item \return QString, name of the component item.- Specified by:
getNamein interfaceComponentItem- Returns:
- String Returns a String
-
setVisible
public void setVisible(boolean bVisible) Information provided by the PKI file:
\brief Shows or hides the component item. \param bVisible, true to show the component item, false to hide it.- Specified by:
setVisiblein interfaceComponentItem- Parameters:
bVisible- Takes in a parameter of bVisible
-
type
public int type()Information provided by the PKI file:
\brief Returns the type of the component item. \return int, the type of component. Types: COMPONENT = 1100, CONNECTION = 1101, NOTE = 1102, PACKET = 1103, CLUSTER = 1104, RECTANGLE = 1105, LINE = 1106, ELLIPSE = 1107, MULTIUSERITEM = 1108, QOSPACKET = 1109, RESIZEINDICATOR = 1110, ACCESSORYITEM = 1111, POLYGON = 1112, TEXTPOPUP = 1113- Specified by:
typein interfaceComponentItem- Returns:
- int Returns a int
-
moveBy
public void moveBy(double x, double y) Information provided by the PKI file:
\brief Moves the component item by the specified x and y values. \param x, the value to move the component item by on the x-axis. \param y, the value to move the component item by on the y-axis.- Specified by:
moveByin interfaceComponentItem- Parameters:
x- Takes in a parameter of xy- Takes in a parameter of y
-
moveTo
public void moveTo(double x, double y) Information provided by the PKI file:
\brief Moves the component item to the specified coordinates. \param x, the value to move the component item to on the x-axis. \param y, the value to move the component item to on the y-axis.- Specified by:
moveToin interfaceComponentItem- Parameters:
x- Takes in a parameter of xy- Takes in a parameter of y
-
device
Information provided by the PKI file:
\brief Returns the device. \return Device, the device object.- Specified by:
devicein interfaceComponentItem- Returns:
- Device Returns a Device
-
getXCoordinate
public int getXCoordinate()Information provided by the PKI file:
\brief Returns the x-coordinate of the component item. \return int, the x-coordinate of the component item.- Specified by:
getXCoordinatein interfaceComponentItem- Returns:
- int Returns a int
-
getXCoordinateCenter
public int getXCoordinateCenter()Information provided by the PKI file:
\brief Returns the center x-coordinate of the component item. \return int, the center x-coordinate of the component item.- Specified by:
getXCoordinateCenterin interfaceComponentItem- Returns:
- int Returns a int
-
getYCoordinate
public int getYCoordinate()Information provided by the PKI file:
\brief Returns the y-coordinate of the component item. \return int, the y-coordinate of the component item.- Specified by:
getYCoordinatein interfaceComponentItem- Returns:
- int Returns a int
-
getYCoordinateCenter
public int getYCoordinateCenter()Information provided by the PKI file:
\brief Returns the center y-coordinate of the component item. \return int, the center y-coordinate of the component item.- Specified by:
getYCoordinateCenterin interfaceComponentItem- Returns:
- int Returns a int
-
setX
public void setX(double x) Information provided by the PKI file:
\brief Sets the x-coordinate of the component item. \param x, the x-coordinate of the component item.- Specified by:
setXin interfaceComponentItem- Parameters:
x- Takes in a parameter of x
-
setXCenter
public void setXCenter(int x) Information provided by the PKI file:
\brief Sets the center x-coordinate of the component item. \param x, the center x-coordinate of the component item.- Specified by:
setXCenterin interfaceComponentItem- Parameters:
x- Takes in a parameter of x
-
setY
public void setY(double y) Information provided by the PKI file:
\brief Sets the y-coordinate of the component item. \param y, the y-coordinate of the component item.- Specified by:
setYin interfaceComponentItem- Parameters:
y- Takes in a parameter of y
-
setYCenter
public void setYCenter(int y) Information provided by the PKI file:
\brief Sets the center y-coordinate of the component item. \param y, the y-coordinate of the component item.- Specified by:
setYCenterin interfaceComponentItem- Parameters:
y- Takes in a parameter of y
-
getWidth
public int getWidth()- Specified by:
getWidthin interfaceComponentItem- Returns:
- int Returns a int
-
getHeight
public int getHeight()- Specified by:
getHeightin interfaceComponentItem- Returns:
- int Returns a int
-
setXVelocity
public void setXVelocity(double xv) Information provided by the PKI file:
\brief Sets the x-axis velocity of the component item. \param xv, the x-axis velocity of the component item.- Specified by:
setXVelocityin interfaceComponentItem- Parameters:
xv- Takes in a parameter of xv
-
setYVelocity
public void setYVelocity(double yv) Information provided by the PKI file:
\brief Sets the y-axis velocity of the component item. \param yv, the y-axis velocity of the component item.- Specified by:
setYVelocityin interfaceComponentItem- Parameters:
yv- Takes in a parameter of yv
-
setVelocity
public void setVelocity(double xv, double yv) Information provided by the PKI file:
\brief Sets the x-axis and y-axis velocity of the component item. \param xv, the x-axis velocity of the component item. \param yv, the y-axis velocity of the component item.- Specified by:
setVelocityin interfaceComponentItem- Parameters:
xv- Takes in a parameter of xvyv- Takes in a parameter of yv
-
xVelocity
public double xVelocity()Information provided by the PKI file:
\brief Returns the x-axis velocity of the component item. \return double, the x-axis velocity of the component item.- Specified by:
xVelocityin interfaceComponentItem- Returns:
- double Returns a double
-
yVelocity
public double yVelocity()Information provided by the PKI file:
\brief Returns the y-axis velocity of the component item. \return double, the y-axis velocity of the component item.- Specified by:
yVelocityin interfaceComponentItem- Returns:
- double Returns a double
-
setSelected
public void setSelected(boolean bSelected) Information provided by the PKI file:
\brief Selects or deselects the component item. \param bSelected, true to select the item, false to deselect it.- Specified by:
setSelectedin interfaceComponentItem- Parameters:
bSelected- Takes in a parameter of bSelected
-
getClusterID
Information provided by the PKI file:
\brief Returns the cluster ID of the component item. \return string, the cluster ID of the component item.- Specified by:
getClusterIDin interfaceComponentItem- Returns:
- String Returns a String
-
getThisClusterID
- Specified by:
getThisClusterIDin interfaceComponentItem- Returns:
- String Returns a String
-
getParent
Information provided by the PKI file:
\brief Returns the parent cluster that contains this component item. \return ComponentItem, the parent cluster that contains this component item.- Specified by:
getParentin interfaceComponentItem- Returns:
- ComponentItem Returns a ComponentItem
-
moveOutOfCurrentCluster
public boolean moveOutOfCurrentCluster()Information provided by the PKI file:
\brief Moves the component item out of the current cluster and returns whether it was successful. \return boolean, whether the move was successful.- Specified by:
moveOutOfCurrentClusterin interfaceComponentItem- Returns:
- boolean Returns a boolean
-
moveIntoCluster
Information provided by the PKI file:
\brief Moves the component item into a cluster in the same level with the specified name and returns whether it was successful. \param name, the name of the cluster in the same level \return boolean, whether the move was successful.- Specified by:
moveIntoClusterin interfaceComponentItem- Parameters:
name- Takes in a parameter of name- Returns:
- boolean Returns a boolean
-
loadAccessoryImage
Information provided by the PKI file:
\brief Loads an image for an accessory. \param slotNum, accessory slot index. \param imagePath, path to the image to use for the accessory. \return bool, true if successful, false if not.- Specified by:
loadAccessoryImagein interfaceComponentItem- Parameters:
slotNum- Takes in a parameter of slotNumimagePath- Takes in a parameter of imagePath- Returns:
- boolean Returns a boolean
-
removeAccessory
public void removeAccessory(int slotNum) Information provided by the PKI file:
\brief Removes an accessory. \param slotNum, index of the accessory to remove.- Specified by:
removeAccessoryin interfaceComponentItem- Parameters:
slotNum- Takes in a parameter of slotNum
-